package com.itheima.springbootmybatistest.common;

/**
 * @Description:
 * @Version: V1.0
 */
public class Result<T> {
    private boolean flag;
    private String message;
    private T result;

    public Result(boolean flag, String message, T result) {
        this.flag = flag;
        this.message = message;
        this.result = result;
    }

    public Result(boolean flag, String message) {
        this.flag = flag;
        this.message = message;
    }

    public boolean isFlag() {
        return flag;
    }

    public void setFlag(boolean flag) {
        this.flag = flag;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public T getResult() {
        return result;
    }

    public void setResult(T result) {
        this.result = result;
    }

    @Override
    public String toString() {
        return "Result{" + "flag=" + flag + ", message='" + message + '\'' + ", result=" + result + '}';
    }
}
